package se.cbb.scripts;

import java.io.BufferedReader;
import java.io.FileReader;

import se.cbb.misc.SequenceFileWriter;

public class SelectSecondSample {

	public static void main(String[] args) {
		try {
			String path = "/Users/rhali/Desktop/";
			String fileName = "Large_JPrime.mcmc";
			BufferedReader bufferedreader = new BufferedReader(new FileReader(path + fileName));
	
				int index = 0;

				String str;
				
				str = bufferedreader.readLine();
				SequenceFileWriter.writeAndAppendLine(path, "JPrIMe1.mcmc", str);
				while ((str = bufferedreader.readLine()) != null) {
					index++;
					if(index%2 == 0 || index > 10000) {
						SequenceFileWriter.writeAndAppendLine(path, "JPrIMe1.mcmc", str);
					}
				}
				
				
				bufferedreader.close();
		} catch (Exception e) {
			System.out.println("Error : " + e.getMessage());
		}

	}

}
